import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

class PostsButton extends StatelessWidget {
  final IconData icon;
  final String text;
  final GestureTapCallback? onTap;
  const PostsButton({
    super.key,
    required this.icon,
    required this.text,
    this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return GestureDetector(
      onTap: onTap,
      child: Row(
        children: [
          Icon(icon),
          SizedBox(width: 10.w),
          Text(
            text,
            style: TextStyle(fontSize: 24.sp, fontWeight: FontWeight.w900),
          ),
        ],
      ),
    );
  }
}
